<?php
/**
 * Created by PhpStorm.
 * User: 86158
 * Date: 2021/6/15
 * Time: 23:07
 */

namespace App\Models\access;


use App\Models\Model;
use App\Models\User;

class AccessVoteLog extends Model
{
    protected $fillable = [
        'vote_user_id',
        'user_id',
        'access_id',
        'level',
        'score',
        'remark',
        'level_score',
        'leader_type'
    ];

    public function leader()
    {
        return $this->hasOne(User::class,'id','vote_user_id');
    }

    public function user()
    {
        return $this->hasOne(User::class,'id','user_id');
    }

    public function access()
    {
        return $this->hasOne(AccessVote::class,'id','access_id');
    }
}